import type { ILoginQuery } from '@/api';
import type { IResponse } from '../types/index';

export default [
  {
    url: '/mock/login',
    method: 'post',
    response: ({ body }: { body: ILoginQuery }): IResponse => {
      if (body.username == 'admin' && body.password == '123456') {
        return {
          code: 200,
          msg: '登录成功',
          data: 'token',
        };
      } else {
        return {
          code: 0,
          msg: '账号或密码不正确',
          data: '',
        };
      }
    },
  },
];
